package com.lakers.notice.springboot.condition;

import com.lakers.notice.springboot.monitor.MonitorSwitch;
import org.springframework.context.annotation.Condition;
import org.springframework.context.annotation.ConditionContext;
import org.springframework.core.type.AnnotatedTypeMetadata;


/**
 * 功能描述: OnMonitorPropertyCondition
 *
 * @author liqin(zxl)
 * @date 2024/5/13
 */
public class OnMonitorPropertyCondition implements Condition {

    @Override
    public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
        return MonitorSwitch.on(context.getEnvironment());
    }
}
